/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sun.Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Trasheur
 */
@Entity
@Table(name = "INVOICEFORDELAYPENALTY")
@NamedQueries({@NamedQuery(name = "Invoicefordelaypenalty.findAll", query = "SELECT i FROM Invoicefordelaypenalty i"), @NamedQuery(name = "Invoicefordelaypenalty.findByPinvoiceid", query = "SELECT i FROM Invoicefordelaypenalty i WHERE i.pinvoiceid = :pinvoiceid"), @NamedQuery(name = "Invoicefordelaypenalty.findByInvoicetype", query = "SELECT i FROM Invoicefordelaypenalty i WHERE i.invoicetype = :invoicetype"), @NamedQuery(name = "Invoicefordelaypenalty.findByAmount", query = "SELECT i FROM Invoicefordelaypenalty i WHERE i.amount = :amount"), @NamedQuery(name = "Invoicefordelaypenalty.findByIspaid", query = "SELECT i FROM Invoicefordelaypenalty i WHERE i.ispaid = :ispaid")})
public class Invoicefordelaypenalty implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "PINVOICEID")
    private String pinvoiceid;
    @Basic(optional = false)
    @Column(name = "INVOICETYPE")
    private String invoicetype;
    @Column(name = "AMOUNT")
    private Float amount;
    @Basic(optional = false)
    @Column(name = "ISPAID")
    private int ispaid;
    @JoinColumn(name = "ORDERID", referencedColumnName = "SORDERID")
    @ManyToOne(optional = false)
    private Shippingorder orderid;

    public Invoicefordelaypenalty() {
    }

    public Invoicefordelaypenalty(String pinvoiceid) {
        this.pinvoiceid = pinvoiceid;
    }

    public Invoicefordelaypenalty(String pinvoiceid, String invoicetype, int ispaid) {
        this.pinvoiceid = pinvoiceid;
        this.invoicetype = invoicetype;
        this.ispaid = ispaid;
    }

    public String getPinvoiceid() {
        return pinvoiceid;
    }

    public void setPinvoiceid(String pinvoiceid) {
        this.pinvoiceid = pinvoiceid;
    }

    public String getInvoicetype() {
        return invoicetype;
    }

    public void setInvoicetype(String invoicetype) {
        this.invoicetype = invoicetype;
    }

    public Float getAmount() {
        return amount;
    }

    public void setAmount(Float amount) {
        this.amount = amount;
    }

    public int getIspaid() {
        return ispaid;
    }

    public void setIspaid(int ispaid) {
        this.ispaid = ispaid;
    }

    public Shippingorder getOrderid() {
        return orderid;
    }

    public void setOrderid(Shippingorder orderid) {
        this.orderid = orderid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pinvoiceid != null ? pinvoiceid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Invoicefordelaypenalty)) {
            return false;
        }
        Invoicefordelaypenalty other = (Invoicefordelaypenalty) object;
        if ((this.pinvoiceid == null && other.pinvoiceid != null) || (this.pinvoiceid != null && !this.pinvoiceid.equals(other.pinvoiceid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.sun.Entity.Invoicefordelaypenalty[pinvoiceid=" + pinvoiceid + "]";
    }

}
